

{template header}

{template sidebar}

<!-- artile begin -->
<div class="article">
    {template title}

    <!-- 公共帐号信息  -->
    <!--{if $a == 'index' || $a == 'lookWebInfo'}-->
    <table cellpadding="1" cellspacing="1" border="0" width="100%">
        <div class="view">
            <h1>筛选</h1>
            <ul>
                <li>
                    <span>网址类型：</span>
                    <!--{loop $this->webUrlType $k $v}-->
                    <a href="{$this->url($c, lookWebInfo, array('key1' => $k ))}">{$v}</a>
                    <!--{/loop}-->
                </li>
            </ul>
        </div>

        <tr>
            <th width="15%" colspan="2">网站名称</th>
            <th width="20%">网站PV</th>
            <th width="15%">网站权重</th>
            <th width="15%" colspan="2">操作</th>
        </tr>

        <!--{if $result}-->
        <!--{loop $result $v}-->
        <tr>
            <td>{$v['webName']}</td>
            <td>{$v['webPV']}</td>
            <td>{$v['webPri']}</td>
            <td class="operate"><a href="{$this->url($c,'edit',array('id'=>$v['id']))}">编辑</a>
                <a title="删除" class="del" href="{$this->url($c,'del',array('id'=>$v['id']))}">删除</a></td>
        </tr>
        <!--{/loop}-->
        <!--{/if}-->

        <!--{if $pager}-->
        <!--分页开始-->
        <tr>
            <td colspan="6">
                <div class="page">{$pager}</div>
            </td>
        </tr>
        <!--分页结束-->
        <!--{/if}-->

        <!--{if $result == 0}-->
        <tr>
            <td colspan="6">没有数据记录！</td>
        </tr>
        <!--{/if}-->


        <tr>
            <td colspan="6" class="td4">
                <a title="添加网址信息" class="btn btn-success" href="{$this->url($c,'addWebInfo')}">添加网址信息</a>
            </td>
        </tr>


    </table>
    <!--{/if}-->

    <!--{if $a == 'editWebInfo' || $a == 'addWebInfo'}-->
    <form method="post" action="{$this->url($c, 'saveAccount', array('id' => $result['id']) )}">
        <table cellpadding="1" cellspacing="1" width="100%" border="0">
            <tr>
                <td class="td1" width="30%">网站名称：</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="webName" placeholder="请输入帐号名称" class="required" value="{$a == 'edit' ? $result['webName'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">网站日访问IP</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="webPV" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['webPV'] : ''}" />

                </td>

            </tr>


            <tr>
                <td class="td1" width="30%">网站权重</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="webPri" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['webPri'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">网站地址</td>
                <td class="td2">
                    <!-- class="required" 必填字段  -->
                    <input type="text" size="15" name="webUrl" placeholder="请输入联系电话" class="required" value="{$a == 'edit' ? $result['webUrl'] : ''}" />

                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">网站类型：</td>
                <td class="td2">
                    <select name="webUrlType" id="templateId"  onchange="webTypeChange(this.value)">
                        <!--{loop $this->webUrlType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                    </select>
                </td>

            </tr>

            <script >
                function webTypeChange( v ) {
                    var url = "{$this->url($c,'addWebInfo')}";
                    window.location.href = url + "&webUrlType=" + v;
                }

            </script>
            <tr>
                <td class="td1" width="30%">网站子类型：</td>
                <td class="td2">
                    <select name="webUrlSubType"  >
                      <!--{if $webUrlType ==  0}-->
                        <!--{loop $this->childrenSubType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlSubType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                        <!--{/if}-->
                        <!--{if $webUrlType ==  1}-->
                        <!--{loop $this->infoSubType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlSubType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                        <!--{/if}-->
                        <!--{if $webUrlType ==  2}-->
                        <!--{loop $this->productSubType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlSubType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                        <!--{/if}-->
                        <!--{if $webUrlType ==  3}-->
                        <!--{loop $this->webSiteSubType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlSubType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                        <!--{/if}-->
                        <!--{if $webUrlType ==  4}-->
                        <!--{loop $this->companySubType $k $v}-->
                        <option value="{$k}" {echo $result['webUrlSubType'] == $k ?  'selected' : '' }  >{$v}</option>
                        <!--{/loop}-->
                        <!--{/if}-->
                    </select>
                </td>

            </tr>
            <tr>
                <td class="td1" width="30%">网站说明：</td>
                <td class="td2">
                    <textarea name="comment" placeholder="请输入SQL语句" cols="60" rows="5" class="required"></textarea>
                </td>
            </tr>

            <tr>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">保存</a>
                </td>
                <td colspan="3" class="td4">
                    <a class="btn btn-success save" href="{$this->url($c)}">重置</a>
                </td>
            </tr>
        </table>
    </form>
    <!--{/if}-->

</div>
<!-- artile end -->
{template footer}